<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Document</title>
  </head>
  <body>
    <script>
      var obj1 = { name: '小明', age: 18 };
      var obj2 = obj1;
      // obj1指向了一个新创建的对象
      obj1 = { name: '小红', age: 17 };
      // obj2仍然指向原来的对象
      console.log(obj2.name);		// 输出结果：小明
    </script>
  </body>
</html>